<template>
  <div>
    Child
    <p>count is {{ count }}</p>
    <p>
      <button @click="changeParentValue">更改父组件中的值</button>
    </p>
  </div>
</template>

<script>
export default {
  data () {
    return {
      count: 100
    }
  },
  methods: {
    test () {
      alert('test')
    },
    changeParentValue () {
      //   console.log(this.$parent.$parent)
      this.$parent.food = 'KFC'
    }
  }
}
</script>
